<?php

$sock = socket_create(AF_INET, SOCK_DGRAM,0);

$mMessageFrame     = 1;
$mMessageFramePacked     = pack("i",$mMessageFrame);

$mOutgoingSequence = 1;
$mOutgoingSequencePacked = pack("s",$mOutgoingSequence);

$flags = 1;
$flagsPacked = pack("i",$flags);

$mKeyCurrent = "i";
$mKeyCurrentPacked = pack("i",$mKeyCurrent);

$packed = $mMessageFramePacked;
$packed .= $mOutgoingSequencePacked;
$packed .= $flagsPacked;
$packed .= $mKeyCurrentPacked;

$len = strlen($packed);

socket_sendto($sock, $packed, $len, 0, '192.168.1.100', 30004);
socket_close($sock);

?>

